home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / VideoToolboxSources / ATMInterface.h < prev    next >
Text File  |  1995-07-26  |  2KB  |  96 lines

  1. /*
  2.  * ATMInterface.h
  3.  *
  4.  * Version 1.01
  5.  *
  6.  * Adobe Type Manager is a trademark 
  7.  * of Adobe Systems Incorporated.
  8.  */
  9. /*
  10. HISTORY:
  11. 9/7/94 dgp cosmetic editing. Added pragma once.
  12. 9/10/94 dgp changed struct function pointer fields to UniversalProcPtr fields.
  13. 6/8/95 dgp Make sure that the structs are 68k aligned so they'll conform to
  14.     what ATM expects, even if the project is compiled with ppc alignment.
  15. */
  16.  
  17. #pragma once
  18. #define _H_ATMInterface
  19. #ifndef __DEVICES__
  20.     #include <Devices.h>
  21. #endif
  22. #ifndef __TYPES__
  23.     #include <Types.h>
  24. #endif
  25.  
  26. #if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
  27.     #pragma options align=mac68k
  28. #endif
  29.  
  30. typedef struct
  31. {
  32.     Fixed a, b, c, d, tx, ty;
  33. } FixedMatrix;
  34.  
  35. #define ATMProcs3Version 3
  36.  
  37. typedef struct
  38. {
  39.     long version;
  40.     #ifdef __powerc
  41.         UniversalProcPtr fontAvailable,showText,xyshowText;
  42.     #else
  43.         short (*fontAvailable)(short family,
  44.              short style);
  45.         short (*showText)(char *text, 
  46.             short length, FixedMatrix *matrix);
  47.         short (*xyshowText)(char *text, 
  48.             short length, FixedMatrix *matrix,
  49.             Fixed *displacements);
  50.     #endif
  51. } ATMProcs3;
  52.  
  53. #if PRAGMA_ALIGN_SUPPORTED || __MWERKS__
  54.     #pragma options align=reset
  55. #endif
  56.  
  57. #define ATMProcsStatusCode 0
  58.  
  59. /*
  60.     initATM initializes ATMInterface, if not already initialized. Returns 
  61.     1 if and only if ATM is available and
  62.     the procsets are correctly initialized
  63. */
  64. short initATM(void);
  65.  
  66. /* 
  67.     fontAvailableATM returns 1 if and 
  68.     only if ATM can image the specified 
  69.     family and style 
  70. */
  71. short fontAvailableATM(short family,short style);
  72.  
  73. /* 
  74.     showTextATM shows length characters
  75.     starting at text transformed by 
  76.     the specified matrix 
  77.     Returns the number of characters not shown */
  78. /*     Matrix maps one point character space to device space, */
  79. /* relative to current pen position */
  80. /* Matrix's tx and ty components are updated */
  81. short showTextATM(char *text,short length,FixedMatrix *matrix);
  82.  
  83. /*
  84.     Show length characters starting 
  85.     at text transformed by the specified 
  86.     matrix.
  87.     Matrix maps one point character space 
  88.     to device space, relative to current pen position.
  89.     Matrix's tx and ty components are updated.
  90.     Character x and y widths are specified 
  91.     by displacements.
  92.     Returns the number of characters not shown.
  93. */
  94. short xyshowTextATM(char *text, short length, 
  95.     FixedMatrix *matrix, Fixed *displacements);
  96.